package com.share.netdisk.file.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@TableName("file")
@Schema(name = "文件表", description = "File对象")
public class File {
    @TableId(value = "file_id", type = IdType.AUTO)
    @Schema(title = "文件ID",example = "1")
    private Long fileId;

    @TableField("user_id")
    @Schema(title = "用户ID",example = "1")
    private Long userId;

    @TableField("parent_id")
    @Schema(title = "父文件ID",example = "1")
    private Long parentId;

    @TableField("home_file_id")
    @Schema(title = "家目录文件ID",example = "1")
    private Long homeFileId;

    @TableField("file_name")
    @Schema(title = "文件名",example = "**.txt")
    private String fileName;

    @TableField("file_url")
    @Schema(title = "文件路径",example = "http://localhost:8080/file/1.txt")
    private String fileUrl;

    @TableField("type_id")
    @Schema(title = "文件类型ID",example = "1")
    private Long typeId;

    @TableField("file_size")
    @Schema(title = "文件大小",example = "1024")
    private Long fileSize;

    @TableField("file_status")
    @Schema(title = "文件状态",example = "1")
    private Integer fileStatus;

    @TableField("reclaim_status")
    @Schema(title = "回收状态",example = "1")
    private Integer reclaimStatus;

    @TableField("share_status")
    @Schema(title = "分享状态",example = "1")
    private Integer shareStatus;

    @TableField("update_time")
    @Schema(title = "更新时间",example = "2021-01-01 00:00:00")
    private String updateTime;

    public File(){}

    public File(Long userId, Long parentId, Long homeFileId, String fileName, String fileUrl, Long typeId, Long fileSize,String updateTime) {
        this.userId = userId;
        this.parentId = parentId;
        this.homeFileId = homeFileId;
        this.fileName = fileName;
        this.fileUrl = fileUrl;
        this.typeId = typeId;
        this.fileSize = fileSize;
        this.updateTime = updateTime;
    }

}
